<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		
		<script type="text/javascript">
			
			//concat拼接数组
			var arr = [1,2,3,4];
			var arr2 = [5,6,7,8];
			var arr3 = [9,10,11,12]
			var arr4 = arr.concat(arr2,arr3);
			console.log(arr4);
			
			var arr5 = arr2.join("-")//数组间自定义分隔符
			console.log(arr5);
			
			//字符串转化为数组
			var arr6 = [];
			var str = "q-s-v";
			var arr7 = str.split("-");
			console.log(arr7);
			
			
			//splice 删除/添加/替换 元素
			//index 从指定的index位置添加/删除/替换元素
			//howMany 需要删除元素个数（若是删除则启用，0为不删除）
			//为替换的字符或数组
			var arr8 = [1,2,3,4,5];
			arr8.splice(2,2,10,20,30);
			console.log(arr8);
		</script>
	</body>
</html>
